package cn.wolfcode.crm.serivce;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import cn.wolfcode.crm.util.PageResult;

import java.util.List;

public interface IEmployeeService {
    void deleteByPrimaryKey(Long id);

    void saveOrUpdate(Employee record);

    Employee selectByPrimaryKey(Long id);

    PageResult query(EmployeeQueryObject qo);

    /**
     * 验证用户名是否重复
     * 存在返回true
     * 不存在返回false
     * @param username
     * @param empId
     */
    Boolean selectByUsername(String username, Long empId);
    void changeState(Long id);
    void updatePassword(Employee emp);
    Employee slelectByUsernameInfo(String principal);

    List<Employee> selectAll();
}
